/**
 * Licensed to CMIM,Inc. under the terms of the CMIM * Software License version 1.0.
 * See the NOTICE file distributed with this work for additional * information regarding copyright ownership.
 * ---------------------------------------------------------------------------- * Date Author Version
 * 2019/3/16 neusoft 1.0
 **/

package com.xnyzc.lhy.task.fallback.driver;

import com.xnyzc.lhy.task.fegin.driver.QuartzDriverWorkStatisticsService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.stereotype.Service;

/**
 * 服务的降级， 如出现远程调用失败，则会触发该回调
 */
@Slf4j
@Service
public class QuartzDriverWorkStatisticsFallback implements QuartzDriverWorkStatisticsService {

    @Autowired
    private RedisTemplate redisTemplate;

    @Override
    public void updateOrdersData() {
        log.error("处理司机在线时长异常");
    }

    @Override
    public void driverActiveListen() {
        log.info("监听活跃司机异常!");
    }

    @Override
    public void updateOrderStatus() {
        log.info("更改订单状态为订单超时失败!");
    }

    @Override
    public void reFushUpdatePhoneCount() {
        log.error("修改手机号服务调用失败!");
    }

    @Override
    public void driverLockProtection() {
        log.error("司机锁定保护机制异常");
    }

    @Override
    public void paymentReview() {
        log.error("未完成订单复查任务失败");
    }

    @Override
    public void dispatchOrder() {
        log.error("调度订单开始!");
    }
}
